<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var obj = {
            a: 1,
            d: {
                fxxk: 4
            },
            b: 2,
            c: {
                otto: 1
            }
        }
        console.log(typeof obj)

        function deepClone(params) {
            let obj = params;
            let obj1 = {};
            for (let i in obj) {
                if (typeof obj[i] === "object") {
                    obj1[i] = deepClone(obj[i])
                } else {
                    obj1[i] = obj[i]
                }
            }
            return obj1;
        }
        console.log(obj)

        var s = deepClone(obj)
        console.log(s)
    </script>
</body>

</html>